package cn.hdu.liang.ch9;

interface A {
    default void hello() {
        System.out.println("Hello from A");
    }
}

interface B extends A {
    default void hello() {
        System.out.println("Hello from B");
    }
}

/*class C implements A, B {
    public static void hello() {
        System.out.println("Hello from C");
    }
}

interface A {
    default void hello() {
        System.out.println("Hello from A");
    }
}*/

class D implements A {
    @Override
    public void hello() {
        System.out.println("Hello from D");
    }
}

public class Ambiguous extends D implements B, A {
    public static void main(String[] args) {
        new Ambiguous().hello();
    }

}
